<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>卡车信息详情</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<form id="formSet1">
	<table class="sq-formTable">
        <tbody>
            <tr>
            	<td width="80%" valign="top">
            		<div class="sqPanel">
                        <div class="sqPanel_head">
                        	<div class="label">产品详细信息</div>
                        </div>
                    </div>
                        <div class="fieldset1 tabel_col clearFix">
                        	<div class="fieldBox col_33">
	                        	<div class="label">产品名称</span></div>
				                <div class="field">
				                	<span name="prdNm" id="prdNm">&nbsp;</span>
				                </div>
				            </div>
                        	<div class="fieldBox col_33">
	                        	<div class="label">产品类型</span></div>
				                <div class="field">
				                	<span name="prdTypCdNm" id="prdTypCdNm">&nbsp;</span>
				                </div>
				            </div>
                        	<div class="fieldBox col_33">
	                        	<div class="label">产品所属厂商</span></div>
				                <div class="field">
				                	<span name="mfrNm" id="mfrNm">&nbsp;</span>
				                </div>
				            </div>
                        	<div class="fieldBox col_33">
	                        	<div class="label">产品品牌</span></div>
				                <div class="field">
				                	<span name="brCdNm" id="brCdNm">&nbsp;</span>
				                </div>
				            </div>
                        	<div class="fieldBox col_33">
	                        	<div class="label">设备状态 (是否启用)</span></div>
				                <div class="field">
				                	<span name="isValidNm" id="isValidNm">&nbsp;</span>
				                </div>
				            </div>
				            <div class="fieldBox col_33">
				            	<div class="label">建议价格(元)</div>
				                <div class="field">
				                	<span name="guidePcDouble" id="guidePcDouble">&nbsp;</span>
				                </div>
				            </div>
				            <div class="fieldBox col_33">
				            	<div class="label">产品型号</div>
				                <div class="field">
				                	<span name="prdMdl" id="prdMdl">&nbsp;</span>
				                </div>
				            </div>
				            <div class="fieldBox col_33">
				            	<div class="label">产品种类</div>
				                <div class="field">
				                	<span name="prdClsCdNm" id="prdClsCdNm">&nbsp;</span>
				                </div>
				            </div>
				            <div id="dyncBizdiv">
			                	<jsp:include page="prdTkInfoDetailDynamicPage.jsp"></jsp:include>
			                </div>
			                <div class="fieldBox col_33">
				            	<div class="label">子产品建议价格(元)</div>
				                <div class="field">
				                	<span name="guidePcDouble_tk" id="guidePcDouble_tk">&nbsp;</span>
				                </div>
				            </div>
				            <div class="fieldBox col_100">
				            	<div class="label">备注</div>
				                <div class="field">
				                	<span name="prdRem" id="prdRem">&nbsp;</span>
				                    <input name="pId" id="pId" type="hidden" value="${id }">
				                </div>
				            </div>
                        </div>
            	</td>
            </tr>
		</tbody>
	</table>
	</form>
</body>

<script type="text/javascript">
var _bizTypCd = '${bizTypCd}';
var _bizCd = '${bizCd}';
var _sGrpCd = '${sGrpCd}';
var _sCode = '${sCode}';
var _prdId = '${prdId}';

$(function () {
	var form = $("#formSet1").ligerForm({
		validate: true
    });
	var _url = '<%=path%>/product/prdTkInfo/toTkDynamicFldDetailPage.do';
	//刷新动态组件
	var wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
    $("#dyncBizdiv").load(_url,{bizTypCd:_bizTypCd, bizCd:_bizCd},function(responseText,textStatus){
		wait_dialog.close();
		initData();//加载完组件后初始化数据
    });
	
	setPrdBscInfo();
})
	frameElement.dialog.onCancel = function () {
	     frameElement.dialog.close();
	}

	function setPrdBscInfo(){
		if(!_prdId){
			return;
		}
    	var _url = '<%=path%>/product/prdBscInfo/getById.do';
    	$.ajax({
    		type: 'get',
    		dataType:'json',
    		data:{id:_prdId},
    		url: _url,
    		success:function(msg){
    			 if(msg.success == 1){
    				 setPrdBscInfoData(msg.data);//设置数据
    			 }else{
    				 $.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
    			 }
    		}
    	});
   	}
	//设置产品基本信息	
	function setPrdBscInfoData(data){
		$("#prdNm").html(data.prdNm);
		$("#prdTypCdNm").html(data.prdTypCdNm);
		$("#mfrNm").html(data.mfrNm);
		$("#brCdNm").html(data.brCdNm);
		$("#isValidNm").html(data.isValidNm);
		$("#prdMdl").html(data.prdMdl);
		$("#guidePcDouble").html(data.guidePcDouble);
		$("#prdRem").html(data.prdRem);
		$("#prdClsCdNm").html(data.prdClsCdNm);
	}
	function initData(){
			var id = $("#pId").val();
			if(!id){
				return;
			}
	    	var _url = '<%=path%>/product/prdTkInfo/getById.do';
	    	$.ajax({
	    		type: 'get',
	    		dataType:'json',
	    		data:{id:id},
	    		url: _url,
	    		success:function(msg){
	    			 if(msg.success == 1){
	    				 setData(msg.data);//设置数据
	    			 }else{
	    				 $.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
	    			 }
	    		}
	    	});
    	}
	function setData(data){
		$("#drvTyp").html(data.drvTyp);
		$("#engMdl").html(data.engMdl);
		$("#hp").html(data.hp);
		$("#emiStd").html(data.emiStd);
		$("#cabSpec").html(data.cabSpec);
		$("#grboxMdl").html(data.grboxMdl);
		$("#rearAxleSpec").html(data.rearAxleSpec);
		$("#mWhlSpec").html(data.mwhlSpec);
		$("#gasCylSpec").html(data.gasCylSpec);
		$("#saddleSpec").html(data.saddleSpec);
		$("#whlBase").html(data.whlBase);
		$("#cntrSz").html(data.cntrSz);
		$("#clsExfPcDouble").html(data.clsExfPcDouble);
		$("#mOthInfo").html(data.mOthInfo);
		$("#actCntrSz").html(data.actCntrSz);
		$("#thickness").html(data.thickness);
		$("#axleInfo").html(data.axleInfo);
		$("#doorInfo").html(data.doorInfo);
		$("#trlWhlSpec").html(data.trlWhlSpec);
		$("#cylSepc").html(data.cylSepc);
		$("#tankVol").html(data.tankVol);
		$("#othInfo").html(data.othInfo);
		$("#isHvAirCndNm").html(data.isHvAirCndNm);
		$("#isHvSubNm").html(data.isHvSubNm);
		$("#matQalCdNm").html(data.matQalCdNm);
		$("#liftWayCdNm").html(data.liftWayCdNm);
		$("#isHvWhlNm").html(data.isHvWhlNm);
		$("#guidePcDouble_tk").html(data.guidePcDouble_tk);
		$("#batDeg").html(data.batDeg);
		$("#seatRowCdNm").html(data.seatRowCdNm);
		$("#isNew").html(data.isNewNm);
		$("#fuelTypCd").html(data.fuelTypCdNm);
	}
	
</script>